home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
ptv1n3.arc
/
FLOPWAIT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-08-01
|
710b
|
32 lines
Unit FlopWait;
Interface {none}
Implementation
VAR
tickTil : LongInt;
TimerTicks : LongInt ABSOLUTE $40:$6C;
motorStatus : BYTE Absolute $40:$3F;
oldStatus : Byte;
BEGIN
oldStatus := MotorStatus;
IF MotorStatus AND $F > 0 THEN
BEGIN
Write('Loading...');
TickTil := TimerTicks + 91; {91 ticks ~= 5 seconds}
IF TickTil > $17FE80 THEN { Hex 17FE80 = midnight }
BEGIN
Dec(TickTil, $17FE80);
REPEAT
UNTIL (MotorStatus <> OldStatus) OR
(TimerTicks < TickTil)
END;
REPEAT
UNTIL (MotorStatus <> oldStatus) OR
(TimerTicks >= TickTil);
END;
END.